package com.dly.hope.config;

import com.querydsl.jpa.impl.JPAQueryFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;
import javax.persistence.EntityManager;

/**
 * @author linyu.dai
 * @project myserve
 * @description JpaFactory
 * @creat 2022/8/26 14:23:29
 */
@Configuration
public class JpaQueryConfig {

    @Resource
    private EntityManager entityManager;

    @Bean
    public JPAQueryFactory getJPAQueryFactory(){
        return new JPAQueryFactory(entityManager);
    }
}
